Optimal. Leaf size=37 \[ \frac{x}{2}+\frac{1}{2} \log (\sin (x))+\frac{1}{3} \log \left (\cot ^2(x)-\cot (x)+1\right )-\frac{1}{6} \log (\cot (x)+1) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0619308, antiderivative size = 37, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.75, Rules used = {3661, 2074, 635, 203, 260, 628} \[ \frac{x}{2}+\frac{1}{2} \log (\sin (x))+\frac{1}{3} \log \left (\cot ^2(x)-\cot (x)+1\right )-\frac{1}{6} \log (\cot (x)+1) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3661
Rule 2074
Rule 635
Rule 203
Rule 260
Rule 628
Rubi steps
\begin{align*} \int \frac{1}{1+\cot ^3(x)} \, dx &=-\operatorname{Subst}\left (\int \frac{1}{\left (1+x^2\right ) \left (1+x^3\right )} \, dx,x,\cot (x)\right )\\ &=-\operatorname{Subst}\left (\int \left (\frac{1}{6 (1+x)}+\frac{1+x}{2 \left (1+x^2\right )}+\frac{1-2 x}{3 \left (1-x+x^2\right )}\right ) \, dx,x,\cot (x)\right )\\ &=-\frac{1}{6} \log (1+\cot (x))-\frac{1}{3} \operatorname{Subst}\left (\int \frac{1-2 x}{1-x+x^2} \, dx,x,\cot (x)\right )-\frac{1}{2} \operatorname{Subst}\left (\int \frac{1+x}{1+x^2} \, dx,x,\cot (x)\right )\\ &=-\frac{1}{6} \log (1+\cot (x))+\frac{1}{3} \log \left (1-\cot (x)+\cot ^2(x)\right )-\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\cot (x)\right )-\frac{1}{2} \operatorname{Subst}\left (\int \frac{x}{1+x^2} \, dx,x,\cot (x)\right )\\ &=\frac{x}{2}-\frac{1}{6} \log (1+\cot (x))+\frac{1}{3} \log \left (1-\cot (x)+\cot ^2(x)\right )+\frac{1}{2} \log (\sin (x))\\ \end{align*}
Mathematica [C] time = 0.032916, size = 57, normalized size = 1.54 \[ \frac{1}{3} \log \left (\tan ^2(x)-\tan (x)+1\right )+\left (-\frac{1}{4}-\frac{i}{4}\right ) \log (-\tan (x)+i)-\left (\frac{1}{4}-\frac{i}{4}\right ) \log (\tan (x)+i)-\frac{1}{6} \log (\tan (x)+1) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.022, size = 37, normalized size = 1. \begin{align*} -{\frac{\ln \left ( 1+ \left ( \cot \left ( x \right ) \right ) ^{2} \right ) }{4}}-{\frac{\pi }{4}}+{\frac{\ln \left ( 1-\cot \left ( x \right ) + \left ( \cot \left ( x \right ) \right ) ^{2} \right ) }{3}}-{\frac{\ln \left ( 1+\cot \left ( x \right ) \right ) }{6}}+{\frac{x}{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.63021, size = 45, normalized size = 1.22 \begin{align*} \frac{1}{2} \, x + \frac{1}{3} \, \log \left (\tan \left (x\right )^{2} - \tan \left (x\right ) + 1\right ) - \frac{1}{4} \, \log \left (\tan \left (x\right )^{2} + 1\right ) - \frac{1}{6} \, \log \left (\tan \left (x\right ) + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.82425, size = 82, normalized size = 2.22 \begin{align*} \frac{1}{2} \, x - \frac{1}{12} \, \log \left (\sin \left (2 \, x\right ) + 1\right ) + \frac{1}{3} \, \log \left (-\frac{1}{2} \, \sin \left (2 \, x\right ) + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.453713, size = 34, normalized size = 0.92 \begin{align*} \frac{x}{2} - \frac{\log{\left (\tan{\left (x \right )} + 1 \right )}}{6} - \frac{\log{\left (\tan ^{2}{\left (x \right )} + 1 \right )}}{4} + \frac{\log{\left (\tan ^{2}{\left (x \right )} - \tan{\left (x \right )} + 1 \right )}}{3} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.21219, size = 46, normalized size = 1.24 \begin{align*} \frac{1}{2} \, x + \frac{1}{3} \, \log \left (\tan \left (x\right )^{2} - \tan \left (x\right ) + 1\right ) - \frac{1}{4} \, \log \left (\tan \left (x\right )^{2} + 1\right ) - \frac{1}{6} \, \log \left ({\left | \tan \left (x\right ) + 1 \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]